﻿@model AutomatedTestDataManagement.Models.SitesPage

@if(ViewData["DeleteFromSite"] == null)
{
    <tr>
        <td>
            @Html.DisplayFor(model => model.Page.PageName)
        </td>
        <td>
            @Html.DisplayFor(model => model.Page.PagePath)
        </td>
        <td>
            @if(ViewData["deletePage"] == null)
            {
                @Html.ActionLink("Edit Page", "Edit", "Page", new { id = Model.PageID, siteID = Model.SiteID }, null) @Html.Encode(" | ")
                @Html.ActionLink("Remove from Site", "Delete", "SitesPage", new { id = Model.SitePageID, siteID = Model.SiteID, returnToView = "Edit" }, null)
            }
            else
            {
                @Html.ActionLink("Remove from Site", "Delete", "SitesPage", new { id = Model.SitePageID, siteID = Model.SiteID, returnToView = "Delete" }, null)
            }
        </td>
    </tr>
}
else
{
    <tr>
        <td>
            @Html.DisplayFor(model => model.Site.SiteName)
        </td>
        <td>
            @Html.DisplayFor(model => model.Site.SiteURL)
        </td>
        <td>
            @Html.ActionLink("Remove Page from Site", "Delete", "SitesPage", new { id = Model.SitePageID, pageID = Model.PageID, returnToView = "Delete" }, null)
        </td>
    </tr>
}